package handler

import (
	"github.com/gin-gonic/gin"
	"month/api/request"
	"month/internal/dao"
	"month/internal/model"
)

func ListReviewer(c *gin.Context) {
	var req request.ListReviewerReq
	if err := c.ShouldBind(&req); err != nil {
		c.JSON(200, gin.H{
			"code": 500,
			"msg":  "查询失败",
			"data": err.Error(),
		})
		return
	}
	var user []model.Users
	dao.GetListByFields(&model.Users{UType: req.UType}, &user)
	if req.UType != 1 {
		c.JSON(200, gin.H{
			"code": 200,
			"msg":  "查询成功",
			"data": user,
		})
	}
}
